﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace University.Models
{
    public class Account
    {
        public int AccountId { get; set; }

        [Required(ErrorMessage = "Please provide a valid Login")]
        public string Login { get; set; }

        [Required(ErrorMessage = "Please provide a valid Password")]
        public string Password { get; set; }
        
        [RegularExpression(@"^([\w\!\#$\%\&\'*\+\-\/\=\?\^`{\|\}\~]+\.)*[\w\!\#$\%\&\'‌​*\+\-\/\=\?\^`{\|\}\~]+@((((([a-zA-Z0-9]{1}[a-zA-Z0-9\-]{0,62}[a-zA-Z0-9]{1})|[‌​a-zA-Z])\.)+[a-zA-Z]{2,6})|(\d{1,3}\.){3}\d{1,3}(\:\d{1,5})?)$", ErrorMessage = "Email address must be a valid email address.")]
        [Display(Name="E-mail")]
        public string Email { get; set; }
       
        [Required(ErrorMessage = "Please provide a valid Role")]
        public string Role { get; set; }

       // [Required(ErrorMessage = "Please provide a related User")]
        public virtual User User { get; set; }

    }
}